import Vue from 'vue'
import VueRouter from 'vue-router'
import DL from '../views/dlym.vue'
import Zym from '../views/zym.vue'
import Welcome from '../views/welcome.vue'
import Users from '../views/user/Users.vue'
import Rights from '../views/power/Rights.vue'
import Roles from '../views/power/Roles.vue'
import Cate from '../views/goods/Cate.vue'
import Params from '../views/goods/Params.vue'
import GoodList from '../views/goods/List.vue'
import Add from '../views/goods/Add.vue'
import Order from '../views/order/Order.vue'
import Report from '../views/report/Report.vue'
import Index from '../views/spgwc/index.vue'
import Product from '../views/spgwc/product.vue'
import Register from '../views/spgwc/register.vue'
import Produc from '../views/goods/Produc.vue'
import inku from '../views/lnku/inku.vue' // 入库单
import InproductList from '../views/lnku/InproductList.vue' // 进货单列表
import Login from '../views/spgwc/Login.vue'
import register from '../views/spgwc/register.vue'

Vue.use(VueRouter)

const routes = [
  {path: '/',redirect:'/index'},
  { path: '/index', component: Index },
  { path: '/Product/:gsid', component: Product,props: true},
  { path: '/Register', component: Register },
  { path: '/login', component: Login },
  {path:'/register',component:register},
  {
    path:'/zym',
    component:Zym,
    redirect:'/welcome',
    children:[
    {path:'/welcome',component:Welcome},
    {path:'/Users',component:Users},
    {path:'/Permission',component:Rights},
    {path:'/Roles',component:Roles},  
    {path:'/Categories',component:Cate},  
    {path:'/params',component:Params},  
    {path:'/Goods',component:GoodList},
    {path:'/goods/add',component:Add},  
    {path:'/Order',component:Order},
    {path:'/reports',component:Report},
    {path:'/produc',component:Produc},
    { path: '/inku/:gid', name: 'inku', component: inku, props: true }, // 入库
    { path: '/InproductList', name: 'InproductList', component: InproductList }
    ]
  },
  {path:'/dl',component:DL}


]

const router = new VueRouter({
  routes
})

export default router
